{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Building prefix dict from the default dictionary ...\n",
      "Dumping model to file cache C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\jieba.cache\n",
      "Loading model cost 0.826 seconds.\n",
      "Prefix dict has been built successfully.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "精确模式： 研究生/在/研究/生命/的/起源\n",
      "全模式： 研究/研究生/生在/研究/研究生/生命/的/起源\n",
      "搜索引擎模式： 研究/研究生/在/研究/生命/的/起源\n"
     ]
    }
   ],
   "source": [
    "import jieba\n",
    "seg_list=jieba.cut(\"研究生在研究生命的起源\",cut_all=False)\n",
    "print(\"精确模式：\",\"/\".join(seg_list))\n",
    "seg_list=jieba.cut(\"研究生在研究生命的起源\",cut_all=True)\n",
    "print(\"全模式：\",\"/\".join(seg_list))\n",
    "seg_list=jieba.cut_for_search(\"研究生在研究生命的起源\")\n",
    "print(\"搜索引擎模式：\",\"/\".join(seg_list))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
